<?php

$dir = __DIR__;
$less = glob($dir . '/*.less');
foreach($less as $l){
	$file_name = preg_replace("/^.+?(\w+\.less)$/", "$1", $l);
	exec("lessc $file_name > " . str_replace(".less",'.css',$file_name));
	// echo $file_name;
}
// exec("lessc ")
// print_r($less);
// echo $dir;